﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace DanceIntegration.Models
{
    public class SectionViewModel
    {
        public SectionViewModel(db.Section x)
        {

            ID = x.ID;
            Name = x.Name;
            PrevSectionID = x.PrevSectionID;
            

        }

        public int ID { get; set; }

        public int? PrevSectionID { get; set; }


        [Required]
        [Display(Name = "Название")]
        [StringLength(200, ErrorMessage = "{0} должно быть не менее {2} символов длинной.", MinimumLength = 2)]
        public string Name { get; set; }


    }


    public class SectionListViewModel
    {

        public int? Seed { get; set; } 
        public IEnumerable<SectionViewModel> Sections { get; set; } 


    }

}